//z为可选类型
function printpoint(point:{x:number,y:number,z?:number}){
  console.log(point.x);
  console.log(point.y);
  console.log(point.z);
}

printpoint({x:1,y:2})
printpoint({x:1,y:2,z:111})